from typing import Optional, List
import os

AK = '2jCwbiCWReSVlPbt53f9pYhP'
SK = 'dwJ8BULLCsBMXsmtjyxNI8hkw4y0HPXq'
os.environ['QIANFAN_AK'] = AK
os.environ['QIANFAN_SK'] = SK
from langchain import ConversationChain
from langchain.chat_models import QianfanChatEndpoint

llm = QianfanChatEndpoint()
conversation = ConversationChain(llm=llm)
result1 = conversation.predict(input='小明有一只猫')
print(result1)
print('*' * 80)
result2 = conversation.predict(input='小钢有9只狗')
print(result2)
print('=' * 80)
result3 = conversation.predict(input='小明和小刚一共有几只宠物')


print(result3)
print('打印结束')
